class Complex
{
public:
	Complex( double r, double i = 0 ) : real( r ), imaginary( i )
	{
	}

private:
	friend bool operator == ( const Complex &a, const Complex &b );
	friend Complex operator + ( const Complex &a, const Complex &b );
	double real, imaginary;
};

inline bool operator == ( const Complex &a, const Complex &b )
{
	return a.real == b.real  &&  a.imaginary == b.imaginary;
}

inline Complex operator + ( const Complex &a, const Complex &b )
{
	Complex r( 0, 0 );

	r.real = a.real + b.real;
	r.imaginary = a.imaginary + b.imaginary;
	return r;
}
